#!/bin/bash
for i in `cat ip.txt`
do
             if ping -c 1 $i > /dev/null 2>&1
             then
                     echo $i  >> succeed.txt
             else
                     echo $i  >> error.txt
             fi
     done
